package com.itheima06;

import java.util.function.Function;

public class FunctionTest {
    public static void main(String[] args) {

        convert("张三,30", s -> s.split(",")[1], s -> Integer.parseInt(s), s -> s + 70);
    }

    private static void convert(String s, Function<String, String> fun1, Function<String, Integer> fun2, Function<Integer, Integer> fun3) {
        Integer integer = fun1.andThen(fun2).andThen(fun3).apply(s);
        System.out.println(integer);
    }
}
